# 时间复杂度：O(n)
# 空间复杂度：O(n)


class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        hashmap = {}
        for i, num in enumerate(nums):
            if hashmap.get(target-num) is not None:
                return [i, hashmap.get(target-num)]
            hashmap[num] = i
